class SimilityRecommend < ActiveRecord::Base
  attr_accessible :osp_id, :relative_osp_id, :weight
  
  belongs_to :open_source_project, :foreign_key => "osp_id"
  belongs_to :open_source_project, :foreign_key => "relative_osp_id"

  def self.getTableName(osp_id)
    a = osp_id.to_i%100
    targetTableName = 'simility_recommends_' + a.to_s
    return targetTableName
  end
end
